<?php session_start(); if($_SESSION['properlogin'] != 1){ header("Location:error.html"); }?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Information (4/4)</title>
<script type="text/javascript" src="validateInformation.js" ></script>


<?php
require_once 'PIView.php';
if(isset($_POST['Done']))
{
	$f = PIView::checkDuplicate($_SESSION['snum']);
	if($f){
		echo'<script>alert("Student number already exists.")</script>';
	}else{
		PIView::addResident($_SESSION['snum'],$_SESSION['fnme'],$_SESSION['lnme'],$_SESSION['mnme'],$_SESSION['bday'],$_SESSION['gendr'],$_SESSION['cstatus'],$_SESSION['lschool'],$_SESSION['lschtype'],$_SESSION['religion'],$_SESSION['class'],$_SESSION['stfap'],$_SESSION['schol'],$_SESSION['stipe'],$_SESSION['cp'],$_SESSION['email'],$_SESSION['hobbies'],$_SESSION['honors'],$_SESSION['talents'],$_SESSION['ailments'],$_SESSION['meds'],$_SESSION['addres'],$_SESSION['fdnme'],$_SESSION['fjob'],$_SESSION['faddress'],$_SESSION['fincome'],$_SESSION['flife'],$_SESSION['femployer'],$_SESSION['fcp'],$_SESSION['mdnme'],$_SESSION['mjob'],$_SESSION['maddress'],$_SESSION['mincome'],$_SESSION['mlife'],$_SESSION['memployer'],$_SESSION['mcp'],$_SESSION['regn'],$_SESSION['stats'],$_SESSION['numbro'],$_SESSION['numsis'],$_SESSION['order'],$_SESSION['gnme'],$_SESSION['gadd'],$_SESSION['gnum'],$_SESSION['course'],$_SESSION['college']);
	}




}
?>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>

<body>
<table width="100%" border="0" cellpadding="1">
 
  <tr>
    <td>&nbsp;</td>
    <td class="subBanner"><strong> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Resident's Basic Information Form</strong></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><form id="form1" name="form1" method="post" action="" >
      <table width="100%" border="0" cellpadding="1">
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </strong>&nbsp;</td>
          <td id="lname2" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm">Student Number</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo $_SESSION['snum'] ?></td>
          <td width="23%" id="gname" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td width="45%" class="confirm"><strong>Last Name</strong></td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['lnme']) ?></td>
          <td id="gaddress" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm">First Name</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['fnme']) ?></td>
          <td id="gcp" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm">Middle Name</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['mnme']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm">Sex</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['gendr']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm">Civil Status</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['cstatus']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm">Date of Birth</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['bday']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm">College</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['college']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm">Course</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['course']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm">Religion</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['religion']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm">Home Address</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['addres']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm">Last School Attended</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['lschool']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm">Last School Type</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['lschtype']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm">Classification</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['class']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm">STFAP Bracket</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['stfap']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm">Scholarships</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['schol']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm">Allowance</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['stipe']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm">Mobile Number</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['cp']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm">E-mail Address</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['email']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm">Hobbies</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['hobbies']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm">Honors</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['honors']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm">Talents</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['talents']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm">Ailments</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['ailments']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm">Medications</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['meds']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td width="45%" class="confirm"><strong>Father's Name</strong></td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['fdnme']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm">Living?</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['flife']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm">Father's Occupation</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['fjob']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm"> Office Address</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['faddress']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm"> Income</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['fincome']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm"> Employer</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['femployer']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm">Mobile Number</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['fcp']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td width="45%" class="confirm"><strong>Mother's Name</strong></td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['mdnme']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm">Living?</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['mlife']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm">Mother's Occupation</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['mjob']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm"> Office Address</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['maddress']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm"> Income</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['mincome']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm"> Employer</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['memployer']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm">Mobile Number</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['mcp']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td width="45%" class="confirm"><strong>Region</strong></td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['regn']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm">Parents are</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['stats']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm">Number of Brothers</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['numbro']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm"> Number of Sisters</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['numsis']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm"> Birth Order</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['order']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td width="45%" class="confirm"><strong>Guardian's Name</strong></td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['gnme']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm">Address</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['gadd']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm">Contact Number</td>
          <td class="confirm1">&nbsp;</td>
          <td class="confirm1"><?php echo strtoupper($_SESSION['gnum']) ?></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td><input type="submit" name="Done" id="Done" value="Confirm Resident" /></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
      </table>
    </form></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
</body>
</html>
